<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改履约保函')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-agreement-edit" th:object="${bAgreement}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">业务员：</label>
                    <div class="col-sm-8">
                        <input name="userId" th:field="*{userId}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">出函机构及对接人：</label>
                    <div class="col-sm-8">
                        <input name="xmChDjuser" th:field="*{xmChDjuser}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">保函类型：</label>
                    <div class="col-sm-8">
                        <select name="xmBhType" class="form-control" th:with="type=${@dict.getType('bh_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{xmBhType}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">受益人名称：</label>
                    <div class="col-sm-8">
                        <input name="xmSyName" th:field="*{xmSyName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">受益人类型：</label>
                    <div class="col-sm-8">
                        <select name="xmSyType" class="form-control" th:with="type=${@dict.getType('xm_sy_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{xmSyType}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">项目名称：</label>
                    <div class="col-sm-8">
                        <input name="xmName" th:field="*{xmName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">标段：</label>
                    <div class="col-sm-8">
                        <textarea name="xmNameLot" class="form-control">[[*{xmNameLot}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">项目所在地省：</label>
                    <div class="col-sm-8">
                        <input name="xmSheng" th:field="*{xmSheng}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">项目所在地市：</label>
                    <div class="col-sm-8">
                        <input name="xmShi" th:field="*{xmShi}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">项目所在地：</label>
                    <div class="col-sm-8">
                        <input name="xmAddress" th:field="*{xmAddress}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">项目类型：</label>
                    <div class="col-sm-8">
                        <select name="xmType" class="form-control" th:with="type=${@dict.getType('xm_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{xmType}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">是否特殊项目：</label>
                    <div class="col-sm-8">
                        <input name="xmSpecial" th:field="*{xmSpecial}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">特殊项目名称：</label>
                    <div class="col-sm-8">
                        <input name="xmSpecialName" th:field="*{xmSpecialName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">中标时间或合同签署时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="xmDate" th:value="${#dates.format(bAgreement.xmDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">中标金额：</label>
                    <div class="col-sm-8">
                        <input name="xmMoney" th:field="*{xmMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">保函比例：</label>
                    <div class="col-sm-8">
                        <input name="xmBhProportion" th:field="*{xmBhProportion}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">工期：</label>
                    <div class="col-sm-8">
                        <input name="xmGongqi" th:field="*{xmGongqi}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">招文上传url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmArticleUrl" th:field="*{xmArticleUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmArticleUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">上传中标通知url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmZbUrl" th:field="*{xmZbUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmZbUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">合同文件url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmContractUrl" th:field="*{xmContractUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmContractUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">受益人名称依据url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmSyUrl" th:field="*{xmSyUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmSyUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">项目名称依据url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmXmmcyjUrl" th:field="*{xmXmmcyjUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmXmmcyjUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">传保函依据url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmBhyjUrl" th:field="*{xmBhyjUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmBhyjUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">工期依据url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="xmGqyjUrl" th:field="*{xmGqyjUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="xmGqyjUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">企业名称：</label>
                    <div class="col-sm-8">
                        <input name="qyName" th:field="*{qyName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">企业省：</label>
                    <div class="col-sm-8">
                        <input name="qySheng" th:field="*{qySheng}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">企业市：</label>
                    <div class="col-sm-8">
                        <input name="qyShi" th:field="*{qyShi}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">企业地址：</label>
                    <div class="col-sm-8">
                        <input name="qyAddress" th:field="*{qyAddress}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">注册资金：</label>
                    <div class="col-sm-8">
                        <input name="qyZcMoney" th:field="*{qyZcMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">企业成立时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="qyClDate" th:value="${#dates.format(bAgreement.qyClDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">企业最高资质：</label>
                    <div class="col-sm-8">
                        <input name="qyZizhi" th:field="*{qyZizhi}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">特殊情况：</label>
                    <div class="col-sm-8">
                        <input name="qySpecial" th:field="*{qySpecial}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">开票名称：</label>
                    <div class="col-sm-8">
                        <input name="qyKpName" th:field="*{qyKpName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">税号：</label>
                    <div class="col-sm-8">
                        <input name="qyKpNum" th:field="*{qyKpNum}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">开票电话：</label>
                    <div class="col-sm-8">
                        <input name="qyKpPhone" th:field="*{qyKpPhone}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">开票地址：</label>
                    <div class="col-sm-8">
                        <input name="qyKpAddress" th:field="*{qyKpAddress}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">开票开户行：</label>
                    <div class="col-sm-8">
                        <input name="qyKpBank" th:field="*{qyKpBank}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">开户账号：</label>
                    <div class="col-sm-8">
                        <input name="qyKpBankNum" th:field="*{qyKpBankNum}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">邮寄地址：</label>
                    <div class="col-sm-8">
                        <input name="qyKpSendAdress" th:field="*{qyKpSendAdress}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">保函金额：</label>
                    <div class="col-sm-8">
                        <input name="bhMoney" th:field="*{bhMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">保函格式：</label>
                    <div class="col-sm-8">
                        <input name="bhGeshi" th:field="*{bhGeshi}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">格式上传url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="bhGeshiUrl" th:field="*{bhGeshiUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="bhGeshiUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">特殊要求：</label>
                    <div class="col-sm-8">
                        <input name="bhRemark" th:field="*{bhRemark}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">收费：</label>
                    <div class="col-sm-8">
                        <input name="fkMoney" th:field="*{fkMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">付款凭证：</label>
                    <div class="col-sm-8">
                        <input name="fkUrl" th:field="*{fkUrl}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">合作方费用：</label>
                    <div class="col-sm-8">
                        <input name="fkHzMoney" th:field="*{fkHzMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">合作方付款：</label>
                    <div class="col-sm-8">
                        <input name="fkHzUrl" th:field="*{fkHzUrl}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">公司收益：</label>
                    <div class="col-sm-8">
                        <input name="fkShouyi" th:field="*{fkShouyi}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">返润扣税：</label>
                    <div class="col-sm-8">
                        <input name="fkFanrun" th:field="*{fkFanrun}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">受理意见：</label>
                    <div class="col-sm-8">
                        <input name="yyAcceptanceOpinion" th:field="*{yyAcceptanceOpinion}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">价格：</label>
                    <div class="col-sm-8">
                        <input name="yyPrice" th:field="*{yyPrice}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">补充资料url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="yySupplyUrl" th:field="*{yySupplyUrl}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="yySupplyUrl" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">特殊备注：</label>
                    <div class="col-sm-8">
                        <input name="yySpecialRemark" th:field="*{yySpecialRemark}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">签约资料包url：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="yyContractData" th:field="*{yyContractData}">
                       <div class="file-loading">
                            <input class="form-control file-upload" id="yyContractData" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">资料包是否合格：</label>
                    <div class="col-sm-8">
                        <input name="yyContractHg" th:field="*{yyContractHg}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">补充文件描述：</label>
                    <div class="col-sm-8">
                        <textarea name="yySupplyRemark" class="form-control">[[*{yySupplyRemark}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">反担保签署：</label>
                    <div class="col-sm-8">
                        <input name="yyFandanbaoqianshu" th:field="*{yyFandanbaoqianshu}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">邮寄单号：</label>
                    <div class="col-sm-8">
                        <input name="yyYoujidanhao" th:field="*{yyYoujidanhao}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">总费用：</label>
                    <div class="col-sm-8">
                        <input name="ywTotalMoney" th:field="*{ywTotalMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">银行成本：</label>
                    <div class="col-sm-8">
                        <input name="bankMoney" th:field="*{bankMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">银行收款账户：</label>
                    <div class="col-sm-8">
                        <input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">是否收到：</label>
                    <div class="col-sm-8">
                        <input name="bankSf" th:field="*{bankSf}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">银行成本2：</label>
                    <div class="col-sm-8">
                        <input name="bankMoney2" th:field="*{bankMoney2}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">银行账户2：</label>
                    <div class="col-sm-8">
                        <input name="bankAccount2" th:field="*{bankAccount2}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">是否收到2：</label>
                    <div class="col-sm-8">
                        <input name="bankSf2" th:field="*{bankSf2}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">返润：</label>
                    <div class="col-sm-8">
                        <input name="ywFanMoney" th:field="*{ywFanMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">扣税：</label>
                    <div class="col-sm-8">
                        <input name="ywTaxMoney" th:field="*{ywTaxMoney}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">业绩：</label>
                    <div class="col-sm-8">
                        <input name="ywYeji" th:field="*{ywYeji}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">是否开票：</label>
                    <div class="col-sm-8">
                        <input name="sfKp" th:field="*{sfKp}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">出函日期：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="bhDate" th:value="${#dates.format(bAgreement.bhDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label">邮寄单号：</label>
                    <div class="col-sm-8">
                        <input name="mailNum" th:field="*{mailNum}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "system/agreement";
        $("#form-agreement-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-agreement-edit').serialize());
            }
        }

        $("input[name='xmDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='qyClDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='bhDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $(".file-upload").each(function (i) {
            var val = $("input[name='" + this.id + "']").val()
            $(this).fileinput({
                'uploadUrl': ctx + 'common/upload',
                initialPreviewAsData: true,
                initialPreview: [val],
                maxFileCount: 1,
                autoReplace: true
            }).on('fileuploaded', function (event, data, previewId, index) {
                $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
            }).on('fileremoved', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            })
            $(this).fileinput('_initFileActions');
        });
    </script>
</body>
</html>